testsuite: Don't leak in test runner
authorBenjamin Otte <otte@redhat.com>
Sun, 23 Feb 2014 14:40:09 +0000 (15:40 +0100)
committerBenjamin Otte <otte@redhat.com>
Sun, 23 Feb 2014 14:40:46 +0000 (15:40 +0100)
testsuite/css/parser/test-css-parser.c

index 34ee3ae7dd2d2f747986c49065b011687c3e71e5..f985d86f82e56d872d03852f44db412afb81c788 100644 (file)
@@ -221,12 +221,18 @@ test_css_file (GFile *file)
 static void
 add_test_for_file (GFile *file)
 {
-  g_test_add_vtable (g_file_get_path (file),
+  char *path;
+
+  path = g_file_get_path (file);
+
+  g_test_add_vtable (path,
                      0,
                      g_object_ref (file),
                      NULL,
                      (GTestFixtureFunc) test_css_file,
                      (GTestFixtureFunc) g_object_unref);
+
+  g_free (path);
 }
 
 static int